package com.xyz.study.design_mode.g_builder.mode;

/**
 * 角色：ConcreteBuilder
 * @author XYZ
 * @version 1.0.0
 * @since 2021/1/21
 */
public class ComputerBuilderConcrete implements ComputerBuilder{

    private Computer computer = new Computer();

    @Override
    public void buildCPU(String cpu) {
        computer.setCPU(cpu);
    }

    @Override
    public void buildMemory(String memory) {
        computer.setMemory(memory);
    }

    @Override
    public void buildHardDisk(String hardDisk) {
        computer.setHardDisk(hardDisk);
    }

    @Override
    public void buildKeyboard(String keyboard) {
        computer.setKeyboard(keyboard);
    }

    @Override
    public void buildMouse(String mouse) {
        computer.setMouse(mouse);
    }

    @Override
    public Computer build() {
        return computer;
    }
}
